'OutStandingIssues: Finir les GET/SET pour les DBNull.Value

Namespace PL.MetaSDK
    Public Class MetaUserOptions
        Private _dataRow As DataRow

        Public Sub New(ByVal dataRow As DataRow)
            Me.DataRow = dataRow
        End Sub

        Public Property PersonOptionID() As Guid
            Get
                Return IIf(IsDBNull(Me.DataRow("PersonOptionID")), Nothing, Me.DataRow("PersonOptionID"))
            End Get
            Set(ByVal value As Guid)
                Me.DataRow("PersonOptionID") = value
            End Set
        End Property

        Public Property UserID_FK() As Guid
            Get
                Return IIf(IsDBNull(Me.DataRow("UserID_FK")), Nothing, Me.DataRow("UserID_FK"))
            End Get
            Set(ByVal value As Guid)
                Me.DataRow("UserID_FK") = value
            End Set
        End Property

        Public Property AppOptionId_FK() As Guid
            Get
                Return IIf(IsDBNull(Me.DataRow("AppOptionId_FK")), Nothing, Me.DataRow("AppOptionId_FK"))
            End Get
            Set(ByVal value As Guid)
                Me.DataRow("AppOptionId_FK") = value
            End Set
        End Property

        Public Property OptionValue() As String
            Get
                Return IIf(IsDBNull(Me.DataRow("OptionValue")), Nothing, Me.DataRow("OptionValue"))
            End Get
            Set(ByVal value As String)
                Me.DataRow("OptionValue") = value
            End Set
        End Property

        Public Property PrecedenceOrder() As Integer
            Get
                Return IIf(IsDBNull(Me.DataRow("PrecedenceOrder")), Nothing, Me.DataRow("PrecedenceOrder"))
            End Get
            Set(ByVal value As Integer)
                Me.DataRow("PrecedenceOrder") = value
            End Set
        End Property

        Public Property Crtd_DT() As Date?
            Get
                Return IIf(IsDBNull(Me.DataRow("Crtd_DT")), Nothing, Me.DataRow("Crtd_DT"))
            End Get
            Set(ByVal value As Date?)
                Me.DataRow("Crtd_DT") = value
            End Set
        End Property

        Public Property Crtd_UId() As String
            Get
                Return IIf(IsDBNull(Me.DataRow("Crtd_UId")), Nothing, Me.DataRow("Crtd_UId"))
            End Get
            Set(ByVal value As String)
                Me.DataRow("Crtd_UId") = value
            End Set
        End Property

        Public Property LUpd_DT() As Date?
            Get
                Return IIf(IsDBNull(Me.DataRow("LUpd_DT")), Nothing, Me.DataRow("LUpd_DT"))
            End Get
            Set(ByVal value As Date?)
                Me.DataRow("LUpd_DT") = value
            End Set
        End Property

        Public Property LUpd_UId() As String
            Get
                Return IIf(IsDBNull(Me.DataRow("LUpd_UId")), Nothing, Me.DataRow("LUpd_UId"))
            End Get
            Set(ByVal value As String)
                Me.DataRow("LUpd_UId") = value
            End Set
        End Property

        Public Property DataRow() As DataRow
            Get
                Return _dataRow
            End Get
            Set(ByVal value As DataRow)
                _dataRow = value
            End Set
        End Property

    End Class
End Namespace
